home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / et / et3_0-a1.lha / et3 / src / ObjFloat.h < prev    next >
C/C++ Source or Header  |  1992-04-27  |  831b  |  44 lines

  1. #ifndef ObjFloat_First
  2. #ifdef __GNUG__
  3. //pragma once
  4. #pragma interface
  5. #endif
  6. #define ObjFloat_First
  7.  
  8. #include "Object.h"
  9.  
  10. //---- ObjFloat ----------------------------------------------------------------
  11.  
  12. class ObjFloat: public Object {
  13.     double val;
  14. public:
  15.     MetaDef(ObjFloat);
  16.  
  17.     ObjFloat(double v= 0.0)
  18.     { val= v; }
  19.  
  20.     double GetValue()                     
  21.     { return val; }
  22.     double SetValue(double newval)           
  23.     { val= newval; Changed(); return val; }
  24.     double operator= (double newval)
  25.     { return SetValue(newval); }
  26.     operator double()
  27.     { return val; }
  28.  
  29.     //---- comparing
  30.     u_long Hash();
  31.     bool IsEqual(Object*);
  32.     int Compare(Object*);
  33.  
  34.     //---- converting
  35.     char* AsString();
  36.  
  37.     //---- activation passivation
  38.     OStream& PrintOn(OStream&);
  39.     IStream& ReadFrom(IStream&);
  40. };
  41.  
  42. #endif
  43.  
  44.